<?php
	/*
	*
	*
	* Template Class
	*				joker
	*
	*			tech.panaceya@gmail.com
	*
	*		GNU. FlyCMS
	*/
 
 
class template { 
	  
	function load () { 
		 global $html; 
 		 $html =  file_get_contents(ROOT_DIR."template/template.html"); 
 	} 
	function add_content($content)   { 
			 global $html; 
			 @$html = str_replace ("{|{CONTENT}|}",$content.'{|{CONTENT}|}', $html);
		} 
	function title($tl= null) {
			global $html; 
		 @$html = str_replace ("{|{TITLE}|}", " :: {|{TITLE}|}".$tl.' :: ' , $html);
	}
	function  print_tpl () {
			$this->clear(); 
			global $html; 
			print $html;
	}
	function clear() { 
			global $html; 
					@$html = str_replace ("{|{CONTENT}|}",'' , $html);
					@$html = str_replace ("{|{TITLE}|}",'' , $html);
					@$html = str_replace ("{|{NAVBAR}|}",'' , $html);
					@$html = str_replace ("{|{VERSION}|}",FLYCMS , $html);
					
		} 

} 

?>
